<?php
namespace LancerWechat;
spl_autoload_register(function ($class) {
    if ($class) {
        $file = str_replace('\\', '/', $class);
        $file .= '.php';
        $file = __DIR__ . '/../' . $file;
        if (file_exists($file)) {
            include $file;
        }
    }
});